﻿using System;
using System.Collections.Generic;
using Model.Config;
namespace IDAL.Config
{
    /// <summary>
    /// 接口层，内容管理，术语接口
    /// </summary>
    public interface ITerm
    {
        /// <summary>
        /// 新增术语记录
        /// </summary>
        /// <param name="info">术语对象</param>
        /// <param name="message">新增返回消息</param>
        /// <returns>返回新增的编号id</returns>
        int InsertTerm(TermInfo info, out string message);

        /// <summary>
        /// 修改术语记录
        /// </summary>
        /// <param name="info">术语对象</param>
        /// <param name="message">修改返回消息</param>
        /// <returns></returns>
        bool UpdateTerm(TermInfo info, out string message);

        /// <summary>
        /// 根据编号返回术语对象
        /// </summary>
        /// <param name="id">列表编号</param>
        /// <returns>返回术语对象</returns>
        TermInfo GetTermByID(int id);

        /// <summary>
        /// 术语列表
        /// </summary>
        /// <param name="condition">术语搜索条件</param>
        /// <returns>返回术语的列表集合</returns>
        IList<TermInfo> ListTerm(TermCondition condition);

        /// <summary>
        /// 术语列表，分页返回
        /// </summary>
        /// <param name="condition">术语搜索条件</param>
        /// <param name="recordCount">满足条件的术语数目</param>
        /// <returns>返回术语的分页列表集合</returns>
        IList<TermInfo> ListTerm(TermCondition condition, out int recordCount);
    }
}
